<?php

namespace app\company\controller;

use think\admin\Controller;
use think\admin\extend\DataExtend;
/**
 * 会议室管理
 * Class Index
 * @package app\paper\controller
 */
class Room extends Controller
{

    /**
     * 当前操作数据库
     * @var string
     */
    protected $table = 'CompanyRoom';
    /**
     * 会议室管理
     * @auth true
     * @menu true
     * @login true
     */
    public function index()
    {
        $this->title = '会议室管理';
        $this->_query($this->table)->like('name')->page();
    }
    /**
     * 列表数据处理
     */
    protected function _index_page_filter(&$data)
    {
    }
    /**
     *添加
     * @auth true
     * @throws \think\db\exception\DataNotFoundException
     * @throws \think\db\exception\DbException
     * @throws \think\db\exception\ModelNotFoundException
     */
    public function add()
    {
        $times = time();
        $map['create_time']=$times;
        $this->_form($this->table, 'form','',[],$map);
    }

    /**
     *修改
     * @auth true
     * @throws \think\db\exception\DataNotFoundException
     * @throws \think\db\exception\DbException
     * @throws \think\db\exception\ModelNotFoundException
     */
    public function edit()
    {
        $times = time();
        $map['create_time']=$times;
        $this->_form($this->table, 'form','',[],$map);
    }


    /**
     *删除
     * @auth true
     * @throws \think\db\exception\DbException
     */
    public function remove()
    {
        $this->_delete($this->table);
    }

}